<!-- 组件模板 -->
<div>
	<label for="">
		姓名{{=it.name}}：
		<input type="text" ref="tt">
	</label>
</div>
<!-- 脚本 -->
<script>
	(function(){
		return {
			props:['name'],
			data: function(){
				return {
					name : "DD"
				}
			},
			mounted: function(){
				console.log(this);
				this.$refs.tt.value = "T " + new Date().getTime();
			},
			methods: {
				doA: function(){
					alert(2)
				}
			},
			created: function(){
				layer.msg("Hello Layer!");
			},
			require:['layer']
		}
	})()
</script>
<!-- 样式 -->
<style>
	input {
		color:red
	}
</style>